package com.sskj.cndragon.presenter;

import android.widget.TextView;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.cndragon.bean.AddressBean;
import com.sskj.cndragon.bean.MyIncomeBean;
import com.sskj.cndragon.ui.activity.SpreadRecordActivity;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonConverter;

import java.util.List;

import io.reactivex.Flowable;


public class SpreadRecordActivityPresenter extends BasePresenter<SpreadRecordActivity> {
    public Flowable<List<MyIncomeBean>> getMyIncomeRecord(String userID, String typeID) {
        return httpService.getMyIncomeRecord(userID,typeID)
                .tag(this)
                .converter(new JsonConverter<HttpData<List<MyIncomeBean>>>() {
                })
                .adapt(new FlowableBody<>())
                .map(listHttpData -> listHttpData.getData());
    }
}
